package operate

import "sieve_proc/constant"

var wsfMap = make(map[string]string)

func init() {
	wsfMap[constant.WsfTag] = constant.WsfTableName
	wsfMap[constant.WsaTag] = constant.WsaTableName
	wsfMap[constant.WssTag] = constant.WssTableName
	wsfMap[constant.FbTag] = constant.FbTableName
	wsfMap[constant.InsTag] = constant.InsTableName
	wsfMap[constant.LinkTag] = constant.LinkTableName
	wsfMap[constant.LinksTag] = constant.LinksTableName
	wsfMap[constant.LinkStandardTag] = constant.LinkStandardTableName
	wsfMap[constant.ViberfTag] = constant.ViberfTableName
	wsfMap[constant.ViberaTag] = constant.ViberaTableName
	wsfMap[constant.AmazonTag] = constant.AmazonTableName
	wsfMap[constant.LineTag] = constant.LineTableName
	wsfMap[constant.LinesTag] = constant.LinesTableName
	wsfMap[constant.ZaloTag] = constant.ZaloTableName
	wsfMap[constant.ZalosTag] = constant.ZalosTableName
	wsfMap[constant.TwitterTag] = constant.TwitterTableName
	wsfMap[constant.SkypeTag] = constant.SkypeTableName
	wsfMap[constant.TgTag] = constant.TgTableName
	wsfMap[constant.TgaTag] = constant.TgaTableName
	wsfMap[constant.MomoTag] = constant.MomoTableName
	wsfMap[constant.MtnMomoTag] = constant.MtnMomoTableName
	wsfMap[constant.MicrosoftTag] = constant.MicrosoftTableName
	wsfMap[constant.TrueMoneyTag] = constant.TrueMoneyTableName
	wsfMap[constant.BotimTag] = constant.BotimTableName
	wsfMap[constant.OperatorStandardTag] = constant.OperatorStandardTableName
	wsfMap[constant.OperatorPremiumTag] = constant.OperatorPremiumTableName
	wsfMap[constant.PhoneCheckTag] = constant.PhoneCheckTableName
	wsfMap[constant.TkTag] = constant.TkTableName
	wsfMap[constant.TkStandardTag] = constant.TkStandardTableName
}

func newFilter(tagName string) *Op_Base {
	if tab, ok := wsfMap[tagName]; ok {
		return &Op_Base{
			TableName: tab,
			OrderInfo: &Op_Order{},
		}
	}
	return nil
}
